package com.user_chat.chat.mapper;

import com.user_chat.chat.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {

    String selectPhoneNumberByUsername(@Param("username")String username);

    /**
     * 根据手机号搜索用户
     * @param phoneNumber
     * @return
     */
    User selectUserByPhoneNumber(String phoneNumber);


    /**
     * 插入一个用户
     * @return
     */
    int insertOne(User user);

    /**
     * 根据用户名查找用户
     * @param username
     * @return
     */
    User selectOneByUsername(String username);

}
